Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create annotated, signed tags #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gvangool
Copy link
Contributor

When creating annotated tags (by passing a message into them), you can use git describe.

For us, this is wanted behavior (anyone can see exactly what version they're using), but it's a matter of preference.

@peritus
Copy link
Owner

peritus commented Apr 21, 2013

Nice. I was also thinking about some git describe integration (especially for presuming current_version if there is none given explicitly).

What's your opinion on using the flag --annotate instead of --tag-message/TAG_MSG ?

@gvangool
Copy link
Contributor Author

If you use git tag --annotate, it will prompt for a message like git commit. So thought it was better to pass in the message immediately.

You could also provide the option to (GPG) sign the tags.

@peritus
Copy link
Owner

peritus commented Apr 22, 2013

Sorry, I meant naming the flag for bumpversion --annotate, as in bumpversion --annotate "myfancyproject v{new_version}"

Sure, --sign should also be supported.

@peritus
Copy link
Owner

peritus commented Apr 22, 2013

Another option, maybe achieving both with more configurability:

What about keeping that generic (looking at about mercurial support, which I don't know that well) and providing a --git-tag-options "--sign --annotate v{new_version} --verify -u mygpgkey --force" flag for configuring things that are git-specific ?

@gvangool
Copy link
Contributor Author

Agreed, sounds good. I'll update accordingly.

@peritus
Copy link
Owner

peritus commented Apr 22, 2013

Maybe check whether mercurial supports a similar workflow first. I'd like to keep general configuration generic and special configuration special.

Sent from my pocket calculator

Am 22.04.2013 um 12:50 schrieb Gert Van Gool [email protected]:

Agreed, sounds good. I'll update accordingly.

Reply to this email directly or view it on GitHub.

When creating annotated tags (by passing a message into them), you can
use "git describe".
@gvangool
Copy link
Contributor Author

I'm not entirely happy at the moment with the escaping, but you can pass anything to the underlying command (git tag or in the future hg tag).

Maybe you have an idea what I need to change in the parser to fix this:

~/env/test/bin/bumpversion --tag-options '"-m \"bumpversion2 v{new_version}\""'

I was hoping to get to ~/env/test/bin/bumpversion --tag-options '-m "bumpversion2 v{new_version}"', but you get this error:

usage: bumpversion [-h] [--config-file FILE] [--bump PART] [--parse REGEX]
                   [--serialize FORMAT] [--current-version VERSION]
                   [--dry-run] [--new-version VERSION] [--commit] [--tag]
                   [--message COMMIT_MSG] [--tag-options TAG_OPTIONS]
                   [file [file ...]]
bumpversion: error: argument --tag-options: expected one argument

@ghost ghost assigned peritus Oct 20, 2013
@peritus peritus mentioned this pull request Jan 4, 2014
@peritus peritus added the v0.4.2 label Mar 24, 2014
@peritus peritus added v0.5 and removed v0.4.2 labels May 29, 2014
@peritus peritus added this to the v0.5.1 milestone Jun 16, 2014
@peritus peritus added v0.5.1 and removed v0.5 labels Jun 16, 2014
@ekohl
Copy link

ekohl commented Oct 8, 2014

Any plans on completing this?

@peritus
Copy link
Owner

peritus commented Oct 9, 2014

@ekohl, you're right. this is a long-standing feature wish. I'm not using annotated tags myself, so getting this right involves a bit of research for me (how are people using annotated signed tags, how about a good default message, etc.).

Patches including tests and documentation are always welcome though :)

@ekohl
Copy link

ekohl commented Oct 9, 2014

@gvangool are you going to finish this or do you mind if I take your code, rebase it and complete it?

@peritus my use case is having a meaningful git describe and that uses annotated tags. This code looks like a good start, though I don't like exposing the raw options. I'm leaning toward simplicity and just expose a tag_message template similar to the commit message and tag_signed boolean flag.

@gvangool
Copy link
Contributor Author

gvangool commented Oct 9, 2014

@ekohl no problem, go wild! I'm not using it at my current job. So haven't looked at it in while.

@peritus
Copy link
Owner

peritus commented Oct 9, 2014

Yes, I'm also not in favor of exposing raw options. Simplicity is king, but so is a universal, versatile, complete solution.

@ekohl If you urgently need this, I'd be happy to collaborate with you on a patch to accelerate this.

@ekohl
Copy link

ekohl commented Oct 9, 2014

@peritus I wouldn't say urgently, but I would be interested. I will try to finish the rebase into a minimal working version and submit a new pull request. There we can discuss it further.

@peritus
Copy link
Owner

peritus commented Oct 9, 2014

Sounds great, looking forward to it!

@ekohl
Copy link

ekohl commented Oct 9, 2014

I opened #58

@peritus peritus removed the v0.5.1 label Jan 5, 2015
@peritus peritus removed this from the v0.5.1 milestone Jan 5, 2015
@gvangool gvangool removed this from the v0.5.1 milestone Jan 5, 2015
@kynan
Copy link

kynan commented Feb 15, 2016

@gvangool This has gone stale, any plans for rebasing?

@peritus What are your current thoughts on this vs. #58 vs. #74?

@kynan
Copy link

kynan commented Feb 15, 2016

@peritus Just to note that annotated tags are an absolute showstopper for me, no point adopting bumpversion without this feature imho. I'm sure many others feel the same. Anything I can do to help get this in please shout!

@jstnlef
Copy link

jstnlef commented Feb 16, 2016

@peritus I'd like to bump this as well. We also prefer using signed release tags at my current job.

ekohl pushed a commit to ekohl/bumpversion that referenced this pull request Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants